﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NCKH.models;
namespace NCKH.Controllers
{
    class EXT_View_DanhSachSVLopTinChi_1_Ctrl
    {
        //public static EXT_View_DanhSachSVLopTinChi_1 LoadData(int key1, string key2, int key3, int key4, string key5, Context db = null)
        //{
        //    if (db == null) db = new Context();
        //    var ID_mon_tcs = db.PLAN_MonTinChi_TCs.Where(p => p.ID_mon == key1).ToList();
        //    int Ky_dang_kys = db.PLAN_HocKyDangKy_TCs.Where(p => p.Nam_hoc == key2 && p.Hoc_ky == key3 && p.Dot == key4).Select(a=>a.Ky_dang_ky).First();
        //    //int ID_hes = db.STU_Hes.Where(p => p.Ten_he == key5).Select(a => a.ID_he).First();
        //    //var ID_lops = db.STU_Lops.Where(p => p.ID_he == ID_hes).ToList();
        //    //foreach
        //    var ds_sv1 = new EXT_View_DanhSachSVLopTinChi_1();
        //    int ID_lop_tcs;
        //    var ds_sv=new STU_DanhSachLopTinChi();
        //    foreach (var value in ID_mon_tcs)
        //    {
        //        ID_lop_tcs = db.PLAN_LopTinChi_TCs.Where(p => p.ID_mon_tc == value.ID_mon_tc).Select(a => a.ID_lop_tc).First();
        //        var value1 = db.STU_DanhSachLopTinChis.Where(p => p.ID_lop_tc == ID_lop_tcs).Select(a => a.ID_sv).Distinct().ToList();
                
        //        //var value2 = db.STU_HoSoSinhViens.Where(p=>p.ID_sv=)
        //        //foreach(int value1 in ds_sv)
        //        //{

        //        //    ds_sv1 = from p in db.STU_HoSoSinhViens where p.ID_sv==value1
        //        //         select new EXT_View_DanhSachSVLopTinChi_1
        //        //         {
        //        //                Trang_thai=true,
        //        //                Ho_ten=p.Ho_ten,
        //        //                Ngaysinh=(DateTime)p.Ngay_sinh,
        //        //                Ma_sv=int.Parse(p.Ma_sv)
        //        //         };
        //        //}
        //    }
        //    return 
        //}
    }
}
